import { get, post, postJson } from "@@/utils/http.util"
import urlFunc from "@@/utils/url.func"
import { baseRes, PageData, indexExhibitionId, activityIntro, activityIntroDetail, partnerList, menubarType } from "@@/interfaces/api.interface"

export default {
  listMenubar(params: indexExhibitionId) {
    return get<baseRes<menubarType[]>>({
      url: `${urlFunc.requestHost()}/api/exhibition/menubar/listMenubar`,
      params
    })
  },
  getBanner(params: indexExhibitionId) {
    return get<baseRes<activityIntro[]>>({
      url: `${urlFunc.requestHost()}/api/exhibition/banner/listBannerByExhibitionId`,
      params
    })
  },

  getProcess(params: indexExhibitionId) {
    return get<baseRes<activityIntro[]>>({
      url: `${urlFunc.requestHost()}/api/exhibition/process/listProcessByExhibitionId`,
      params
    })
  },

  getInfo(params: { id: number }) {
    return get<baseRes<activityIntroDetail>>({
      url: `${urlFunc.requestHost()}/api/exhibition/info`,
      params
    })
  },

  getVideo(params: indexExhibitionId) {
    return get<baseRes<PageData<activityIntro>>>({
      url: `${urlFunc.requestHost()}/api/exhibition/video/list`,
      params
    })
  },

  getImg(params: indexExhibitionId) {
    return get<baseRes<PageData<activityIntro>>>({
      url: `${urlFunc.requestHost()}/api/exhibition/image/list`,
      params
    })
  },

  getNew(params: indexExhibitionId) {
    return get<baseRes<PageData<activityIntro>>>({
      url: `${urlFunc.requestHost()}/api/exhibition/news/list`,
      params
    })
  },
  listNewsByExhibitionId(params: { exhibitionId: string }) {
    return get<baseRes>({
      url: `${urlFunc.requestHost()}/exhibition/news/listNewsByExhibitionId`,
      params
    })
  },
  getPartner(params: indexExhibitionId) {
    return get<baseRes<partnerList[]>>({
      url: `${urlFunc.requestHost()}/api/exhibition/media/listMediaByExhibitionId`,
      params
    })
  }


}





